<template>
	<!--资料下载-->
	<div class="NewsDetails">
		<div class="banner">
			<div class="location">
				<div class="location-text fl">
					<img class="location-img fl" src="../../../static/images/dataDownload.png" />
					<p class="fr">资料下载</p>
				</div>
				<img class="biaotibg fl" src="../../images/home/biaotibg.png" />
				<p class="navigation">
					<span class="go-back">
						<router-link :to="{path:'/index',query:{fatherIndex:0}}">
							首页
						</router-link>
					</span>
					/资料下载
				</p>
			</div>
		</div>
		<div class="NewsInform-list ">
			<div class="List-box">
				<table>
					<thead>
						<tr>
							<th style="width: 500px;">标题</th>
							<th>发布时间</th>
							<th>发布人</th>
							<th>操作</th>
						</tr>
					</thead>
					<tbody>

						<tr v-if="downloadReleaseList.length == 0">
							<td colspan="4" class="center">暂无数据！</td>
						</tr>
						<tr v-for="downloadRelease in downloadReleaseList">
							<td style="width: 500px;"><span class="table-text" :title="downloadRelease.name">{{downloadRelease.name}}</span></td>
							<td>{{formatData(downloadRelease.createAt,"yyyy-MM-dd hh:mm:ss")}}</td>
							<td>{{downloadRelease.publisher}}</td>
							<td>
								<input @click="openModal(downloadRelease.id)" class="Download" type="button" value="查看" />
							</td>
						</tr>
					</tbody>
				</table>
				<!--total  数据总数   size  一页多少条数据   page  当前页码    changge 返回当前选择的页码  改变一页显示条 child  返回值就是一页显示条数  -->
				<pageination :total="total" :size="size" :page="page" :changge="pageFn" @child="obtainChild"></pageination>
				<!--模态框-->
				<div v-if="modelShow" class="tenant-model">
					<div class="tenant-model-content modelShow">
						<header class="tenant-model-header">
							<h3>资料下载</h3>
							<span @click="closeModel" class="closeModel">×</span>
						</header>
						<div class="tenant-model-body">
							<div class="search-contain">
								<!--模态框内容板块-->
								<table>
									<tr>
										<th>序号</th>
										<th class="data-name">资料名称</th>
										<th>操作</th>
									</tr>
									<tr v-for="(url,index) in splitFileName(downloadRelease.content)">
										<td>{{index + 1}}</td>
										<td :title="getFileName(url)"><span class="show-oneline-table">{{getFileName(url)}}</span></td>
										<td>
											<input @click="downloadData(url)" class="Download" type="button" value="下载" />
										</td>
									</tr>
								</table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>
<script src="./DataDownload.js"></script>

<style scoped>
	@import "DataDownload.css"
</style>
